<template>
    <div>
        <HomeHeader  :type_="type_"></HomeHeader>
<v-content >
        <v-container >
        <v-row no-gutters>
            <v-col >
                <v-btn to="/order" color="primary" dark>预约挂号</v-btn>
            </v-col>
            <v-col>
                <span><v-btn  color="primary" dark>充值记录</v-btn></span>
            </v-col>
            <v-col >
                <span><v-btn  color="primary" dark>就诊记录</v-btn></span>
            </v-col>
        </v-row>
    </v-container><!--轮播图-->
            <v-carousel
                    cycle
                    height="400"
                    hide-delimiter-background
                    show-arrows-on-hover
            >
                <v-carousel-item
                        v-for="(slide, i) in slides"
                        :key="i"
                >
                    <v-sheet
                            :color="colors[i]"
                            height="100%"
                    >
                        <v-row
                                class="fill-height"
                                align="center"
                                justify="center"
                        >
                            <div class="display-3">{{ slide }} Slide</div>
                        </v-row>
                    </v-sheet>
                </v-carousel-item>
            </v-carousel>
    </v-content>
<!--        <v-calendar-monthly></v-calendar-monthly>-->
        <Home-Footer :type_="type_"></Home-Footer>
    </div>
</template>
<script>
export default {
  name:"Home",
  data(){
    return{
        // test:'',
        // type_:'use',
      todos:[],
      swiper:[],
        // 轮播
        colors: [
            'green',
            'secondary',
            'yellow darken-4',
            'red lighten-2',
            'orange darken-1',
        ],
        cycle: false,
        slides: [
            'First',
            'Second',
            'Third',
            'Fourth',
            'Fifth',
        ],
        selection: [],
        items: ['Foo', 'Bar', 'Fizz', 'Buzz'],
    }
  },
    methods:{
      _begin(){  this.$http.get().then((res)=>{
          this.test = res.data
      }).catch((err)=>{
          alert(err)
      })

      }
    },
    computed: {
        type_() {
            var x='use'
            if (this.$cookies.isKey('username')) {
                if (this.$cookies.get('username') == 0) {
                    x= 'adm_ok'
                } else if (this.$cookies.get('username') == 1) {
                    x= 'use_ok'
                }
            }
            else {
                x= 'use'
                }
            return x
            }
    },
    mounted(){
      this._begin()
        this.test=this.$cookies.get('username')
        this.testt=this.test
    }
}
</script>
<style scoped>

</style>

